<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib uri="/struts-bean" prefix="bean" %>
<%@ taglib uri="/struts-html" prefix="html" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><bean:message key="website.title"/></title>
<link href="CSS/stylesheet.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="JS/jsonrpc.js"></script>
</head>
<body class="body">
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border:1px; border-style:solid; border-color:#888888">
  <tr>
    <td width="20">&nbsp;</td>
    
    <td width="20">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
    <%@ include file="../nav_title.jsp" %>
	</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
    <html:javascript formName="memLoginForm"/>
	<html:form action="/login.do?method=login" style="margin:0px;" onsubmit="return validateMemLoginForm(this);">
  <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                <TR>
                  <TD class="C_login_Title"><bean:message key="member.login.label"/></TD>
                </TR>
                <TR>
                  <TD>
					<TABLE cellSpacing=0 cellPadding=0 width="90%" align=center border=0>
                        <TR height="30">
                          <TD class="text"><bean:message key="member.login.name"/>：
			 			<html:text property="loginName" size="10" styleClass="textBox"/>
			  	</TD>
                        </TR>
                        <TR height="30">
                          <TD class="text"><bean:message key="member.login.pwd"/>：
				  <html:password property="loginPwd" size="10" styleClass="textBox"/>
			  </TD>
                        </TR>
                        <TR height="30">
                          <TD class="UserRegster" align="right">
                            <html:button property="btn" onclick="reg()"><bean:message key="member.reg.text"/></html:button>
			  	<html:submit><bean:message key="member.login.text"/></html:submit>
			  </TD>
                      </TR>
                  </TABLE> 
	</TR>
  </TABLE>
	  </html:form>             	
	</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td height="30">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td height="30" bgcolor="#4282CE" class="whiteText" align="center">
		<bean:message key="website.foot"/>	</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td height="20">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<script language="javascript">
	
	//密码核对
	function checkPwd(){
		if (document.all.loginPwd.value != document.all.reLoginPwd.value){
			alert('对不起，两次输入的密码不一致，请重新输入！');
			document.all.loginPwd.value = "";
			document.all.reLoginPwd.value ="";
			document.all.loginPwd.focus();
		}
	}
	
	//登录帐号有效性检查
	function checkLoginName(){
		var lname = document.all.loginName.value;
		if ((lname !=null)&&(lname.length>0)&&(!jsonrpc.ajax.chkLoginName(lname))){
			alert('对不起，该登录帐号已被占用，请重新输入！');
			document.all.loginName.focus();
		}
	}	
	
</script>	
</body>
</html>